Chris Mobarek's profile

Creating a Simple Vehicle Rig Blueprint

Creating a Simple Vehicle Rig Blueprint
Unreal Engine 5.3, © 2024
This is a simple vehicle rig blueprint I created to solve the issue of quickly grounding a car to a surface without having to deal with skeletal meshes or setting up an advanced rig in another DCC. Skip to 01:12 for final results. And put sound ON if you're into that sort of thing! ;)

This blueprint was built to be friendly with vehicle masters that contain thousands of pieces of CAD data that need to maintain their transforms for easy updating with future data iterations. Because the blueprint's inputs are only top level actor pivots, vehicle scene trees can be maintained and updated with new data with no interference from the rig. This is to solve the issue of having to recreate a rig every time any data on the vehicle is updated.

The vehicle is grounded by performing line traces at the vehicle center and at each corner (center of tire pivot). By comparing the location of each trace hit, vehicle location and angle of rotation is determined.

The path for the vehicle is determined by creating a spline in top view. The height of the spline points do not need to match the height of the road surface - the entire spline simply needs to be above the entire surface since the line traces occur in Z-.

Instead of recording controller input to determine vehicle path, which requires re-recording when making even small iterations, using a spline provides consistent results and can be modified with ease.

Wheel spin rotation is calculated automatically using the tire's bounding box dimensions to determine tire diameter. From there, the math is elementary. The circumference of a circle is pi * diameter. Then dividing the distance along spline by the circumference gives us how many full rotations the tire should have completed. Multiply this by 360º and you end up with the correct amount of rotation in degrees.


Additional features such as random wheel bump and chassis bump were added to simulate organic imperfections in road travel. These were achieved using multiple layers of perlin noise and have variables exposed to sequencer.

There are a lot of great vehicle rig tools on the Unreal Marketplace, such as Rush Hour, and I highly recommend checking them out! This solution is very basic in comparison, and, while previously used in production, was initially intended to be little more than a technical exercise. 

It will all come down to your production needs and limitations. In the world of design, data is constantly updating with new iterations so working in external DCCs can create pipeline slowdown. Data can also contain tens of thousands of parts and leave little time for optimization. Now add this to the rate of iteration, and it's easy to see how efficiency becomes paramount.
Creating a Simple Vehicle Rig Blueprint
Published:

Owner

Creating a Simple Vehicle Rig Blueprint

Published: